<?php

namespace app\wshop\controller;

use app\BaseController;
use think\facade\Log;
use think\facade\Event;

//这个User废了。日志不到 wshop了
class User extends BaseController
{

    public function info()
    {
        $user['name'] = 'lm';
        $user['sn'] = 'sn';
        Log::info('Test log 001');
//        Event::listen('UserLogin', function ($user) {
//           // Log::info('Test log'.$user['name']);
//            //直接传不进去
//            Log::info("Test log". $user['name']);
//        });

        return "ok";
        //return json($u1);
    }

    //A普通url 可以调。
    //B另一个系统也可以调
    public function handle($e){
        //一次appinit 就一次 handle
        Log::info('handle');
    }

    public function list()
    {
        return "list";
    }


    public function sayhello(){
        return "hello";
    }

}
